Efficient Oracles for Generating Binary Bubble Languages
نویسندگان
چکیده
Given a string α = 10γ in a binary language L, the bubble lower bound is the smallest non-negative integer j such that 1s−10t−j10jγ ∈ L. We present an efficient oracle, which is a function that returns the bubble lower bound, for a number of fixed-density languages including: k-ary Dyck words, connected unit interval graphs, linear-extensions ofB-posets, those lexicographically larger than ω, those avoiding 10 for fixed k, reversible strings and feasible solutions to knapsack problems. Using these oracles, we apply the cool-lex framework to generate each language in constant amortized time. The algorithms generate the strings in either co-lex order or the cyclic cool-lex Gray code and can output each string’s sequence of bits, its run-length block encoding, or the operation (shift or swap) used in the Gray code. Additionally, we prove that the cool-lex Gray code for L can be generated inO(m) amortized time given anO(m) time membership tester for L.
منابع مشابه
Binary bubble languages and cool-lex order
A bubble language is a set of binary strings with a simple closure property: The first 01 of any string can be replaced by 10 to obtain another string in the set. Natural representations of many combinatorial objects are bubble languages. Examples include binary string representations of k-ary trees, unit interval graphs, linear-extensions of B-posets, binary necklaces and Lyndon words, and fea...
متن کاملOracles for Binary Words
The paper proposes a solution to the problem of finding an unspecified binary sequence of known length, using an oracle. Three oracles are defined and used in construction of linear algorithms, with the aim of finding an unknown word α. These algoritms build α by by generating all its prefixes, knowing a specified subword, or using a distance defined on sequences of the same length.
متن کاملShift Gray Codes
Combinatorial objects can be represented by strings, such as 21534 for the permutation (1 2) (3 5 4), or 110100 for the binary tree corresponding to the balanced parentheses (()()). Given a string s = s1s2⋯sn, the right-shift operation ÐÐ→ shift(s, i, j) replaces the substring sisi+1⋯sj by si+1⋯sjsi. In other words, si is right-shifted into position j by applying the permutation (j j−1 ⋯ i) to ...
متن کاملRanking and Loopless Generation of k-ary Dyck Words in Cool-lex Order
A binary string B of length n = kt is a k-ary Dyck word if it contains t copies of 1, and the number of 0s in every prefix of B is at most k−1 times the number of 1s. We provide two loopless algorithms for generating k-ary Dyck words in cool-lex order: (1) The first requires two index variables and assumes k is a constant; (2) The second requires t index variables and works for any k. We also e...
متن کاملDeriving State-Based Test Oracles for Conformance Testing
We address the problem of how to instrument code to log events for conformance testing purposes, and how to write test oracles that process log files. We specifically consider oracles written in languages based on the statemachine formalism. We describe two processes for systematically deriving logging code and oracles from requirements. The first is a process that we have used and taught, and ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. J. Comb.
دوره 19 شماره
صفحات -
تاریخ انتشار 2012